import service from '@/utils/request'

const BASE_URL = 'api-system'

//获取名师列表
export function topTeacherList(data) {
    return service({
        url: `${BASE_URL}/top-teachers`,
        method: 'get',
        params: data
    })
}

// 新增名师
export function addTopTeacher(data) {
    return service({
        url: `${BASE_URL}/top-teacher`,
        method: 'post',
        data
    })
}

// 修改名师
export function updateTopTeacher(data) {
    return service({
        url: `${BASE_URL}/top-teacher`,
        method: 'put',
        data
    })
}

//获取名师
export function getTopTeacher(teacherId) {
    return service({
        url: `${BASE_URL}/top-teacher/${teacherId}`,
        method: 'get'
    })
}

//删除名师
export function deleteTopTeacher(teacherId) {
    return service({
        url: `${BASE_URL}/top-teacher/${teacherId}`,
        method: 'delete'
    })
}

//修改名师状态
export function updateTopTeacherStatus(teacherId, status) {
    return service({
        url: `${BASE_URL}/top-teacher/${teacherId}/status/${status}`,
        method: 'put'
    })
}

//简单名师列表
export function listSimpleTeacher() {
    return service({
        url: `${BASE_URL}/top-teachers/simple`,
        method: 'get'
    })
}
